Update sqlglot to support 27.0.0 or later #4227
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Changes
This PR updates the
sqlglot
requirement to allow the 27.0.0 release. This release includes support for placeholders in SQL, a relatively new syntax feature supported in DBR 15.2 (or Apache Spark 4.0).SQL queries can be of the form:
…where
sdf_system_columns
is passed as a keyword argument, for example:Older versions of sqlgplot would fail on this with a parsing error, but now it's parsed correctly but returns a
Placeholder
AST node as the name of the table instead of a string. Given the complexity of handling this properly, for now I've chosen to preserve the old behaviour: the linter will mark the query as unsupported. (See es-1285042.py for an example of this.)Linked issues
Closes #4203
Tests